<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>报餐分析管理</title>
	<link rel="stylesheet" href="/css/common2.css">
	<link rel="stylesheet" href="/css/popup.css">
	<link rel="stylesheet" href="/scriptZIP/vue-select.min.css">
	<style>
		
		.filter-container {
			display: inline-block;
			flex-wrap: wrap;
			/* 允许换行 */
			gap: 10px;
			/* 输入框之间的间距 */
			max-width: 800px;
			/* 设置最大宽度，可以根据需要调整 */
		}

		.import_model {
			margin-top: -35px;
			margin-left: 130px;
		}

		.table {
			width: 100%;
			margin-left: 0;
		}

		.five {
			max-height: 55px !important;
			min-width: 130px !important;
			padding: 0;
		}

		.three {
			min-width: 100px;
			width: 9%;
		}

		.phone {
			color: blue;
		}

		.long-background-img {
			width: 120px;
			height: 35px;
			background: url("../image/enter_longer.png") no-repeat center center !important;
		}

		.nickname {
			position: absolute;
			left: 40px;
			bottom: calc((100% - 35px) / 2);
			width: 80px;
			text-align: left;
			display: inline-block;
			text-overflow: ellipsis;
			overflow: hidden;
			white-space: nowrap;
		}

		.untying {
			position: absolute;
			right: 0;
			bottom: 0;
			display: inline-block;
			font-size: 12px;
			cursor: pointer;
			color: #9F9F9F;
		}

		.img-box {
			width: 35px;
			height: 35px;
			display: inline-block;
			padding: 0;
		}

		.phone {
			display: inline-block;
		}

		.header {
			width: 35px;
			height: 35px;
			position: absolute;
			left: 3px;
			bottom: calc((100% - 35px) / 2);
			display: inline-block;
			border-radius: 50%;
		}

		.choose-class {
			width: 94%;
			height: 35px;
			margin-left: 3%;
			margin-top: 35px;
		}

		.uihf {
			display: flex;

		}
		.other {
			height: 33px;
			border: 1px solid #7a7a7a;
		}
		

		.search {
			position: relative;
			right: 0px;
			margin: 5px 10px 0 0;
		}
	
	</style>
</head>

<body>
	<div id="vue-root" style="margin-top: 30px;">
		<div class="filter-container">
			<div class="refresh" onclick="location.reload()">刷新</div>
			<div class="uihf">
				
				<select class="search" v-model="search.schoolId">
					<option :value="undefined">请选择校区</option>
					<option v-for="school in schools" :key="school.id" :value="school.id" v-text="school.name">
					</option>
				</select>

                <input placeholder="请输入学员姓名" class="search" v-model="search.name">

				<select class="search" v-model="search.charge">
					<option :value="undefined">是否收费</option>
					<option value="0">未收费</option>
					<option value="1">已收费</option>
					
				</select>
				
				<input placeholder="开始时间" class="search" id="startTime" v-model="search.startTime" style="font-size: 15px; width: 130px;"/>
				<input placeholder="结束时间" class="search" id="endTime" v-model="search.endTime" style="font-size: 15px;width: 130px;"/>
				
				<img src="../image/search.png"  height="35px" width="35" class="search_img" @click="getData0" />
			</div>
		</div>
		<form enctype="multipart/form-data" id="form" ref="form" style="display: none;">
			<input type="file" name="file" id="file" @change="importExcel" ref="file"
				accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel">
		</form>
		<div class="table " style="margin-left: 2%;width: 96%; overflow: auto;">
			<table class="table_top">
				<thead>
					<tr>
						<th class="one">
							<input type="checkbox" class="check-box" v-model="all">
						</th>
						<th class="one">序号</th>
						
						<th class="three">校区</th>
						<th class="one">学员姓名</th>
		   				<th class="one">餐食类型</th>
						   <th class="one">用餐时间</th>
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(student,index) in list" :key="student.id">
						<td>
							<input type="checkbox" class="check-box" v-model="student.checked">
						</td>
						<td class="one"><span v-text="index+1"></span></td>
						<td class="one" v-text="student.schoolName"></td>
						<td class="one" v-text="student.name"></td>
						<td class="one" v-text="student.type === 1 ? '午餐' : '晚餐'"></td>
						<td class="one" v-text="student.date"></td>
					</tr>
					<tr></tr>
				</tbody>
			</table>
		</div>
		<br>
		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
			<li>
				<a v-text="pages"></a>
			</li>
		</ul>
		<div style="float: right;">
			总共{{total}}条记录
			<select class="ui-select init" style="height:32px" v-model="pageSize">
				<option :value="10">每页10条</option>
				<option :value="30">每页30条</option>
				<option :value="100">每页100条</option>
			</select>
		</div>

	</div>
	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>

	<script src="/scriptZIP/vue-select.min.js"></script>
	<script src="/lib/laydate/laydate.js"></script>
	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>
	<script src="/js/auth_util.js"></script>
	<script>

		Vue.component('v-select', VueSelect.VueSelect);
		var app = new Vue(merge({
			data: {
				schools: [],
				urls: {
					del: '/pc/student/del'
				},
				popup: false,
				toClassesId: null,
				boundShow: false,
				shownStudent: null
			},
			created: function () {
				var id = top_params().id;
				if (!id) return;
				this.agentId = id
				this.urls.list = '/pc/mealReservation/getMealAnalysis?agentId=' + this.agentId;
				this.getData();

				axios.get('/pc/school/all/' + id).then(function (res) {
					this.schools = res.data;
				}.bind(this));
				abled('studentData', this);


			},
			methods:{
				
			},

		}));
		["startTime", "endTime"].forEach(function (it) {
			laydate.render({
				elem: "#" + it,
				type: "date",
				done: function (value, date, endDate) {
					app.search[it] = value;
				},
			});
		});
	</script>

</body>

</html>